package com.xteam.ecsystem.utils;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.beans.factory.annotation.Autowired;

import com.xteam.ecsystem.dao.IOrderLogDao;

@Aspect
@SuppressWarnings("unused")
public class LogAgencyAop {
	
	@Autowired
	public IOrderLogDao logDao;
	
	@AfterReturning(value = "execution(public void com.xteam.ecsystem.service.admin.OrderService.updateOrderState(..))&&args( boiId,currentState,optionState,optionChange,ip,user)")
	private void anyMethod(String boiId, String currentState,
			String optionState,String optionChange,String ip,String user) {
		logDao.saveOrderLog(boiId, ip, user, optionState);
	}
}
